1. Field of the Invention
This invention is related to the field of caching data among servers and clients and, more particularly in some embodiments, to caching entity beans and tuning the cache.
2. Description of the Related Art
In a client-server architecture, caching of data provided by a server may be desirable. When multiple tiers are employed (e.g. an application server tier, a database tier, etc.), caching may be even more desirable as the caching at one tier may offload another tier. For example, caching of database data at the application server tier may offload the database tier if a database request hits in the cache, since the cached data may be used instead of forwarding the request to the database tier. If the caching is successful at offloading the database tier, less expensive computer systems may be used in the database tier or the database tier may serve a larger (“wider”) application server tier.
On the other hand, caching also requires the allocation of system resources (storage, CPU cycles to execute the software that manages the cache, etc.). If too much resources are allocated to caching in a given computer system, the performance of that computer system on other tasks may suffer. Additionally, the implementation of caching may be complex in some cases. Accordingly, if caching is not effective (e.g. the cache hit rate is low), the costs of implementing the caching may outweigh the benefits.
Typically, caches are manually created and adjusted through a process of trial and error. The manual adjustment process leads either to a configuration that provides acceptable performance or to the elimination of caching if the resource consumption of caching increases costs to an unacceptable level without providing an acceptable performance level. Once the manual adjustment process is complete, typically the cache is not adjusted again until performance is severely impacted. However, workloads in the system may change characteristics over time, making the cache less effective but not necessarily causing enough performance degradation to warrant repeating the manual process.